<?php
$page_title="Manage Members - Report";

	include("includes/header.php");
?>

<style>
.subMenu1{
list-style:none;
}
.subMenu1 li{
text-align:center;
border:0px solid #ccc;
width:200px;
}

</style>
	
	<form method="post">
	<div class="fleft">
		<input type="radio"  name="dup" id="dupEmail" value="1"  <?if($_POST["dup"]=="1") echo "checked=true"; ?>/> <label for="dupEmail" >Duplicates by Email Id</label>
		<input type="radio"  name="dup" id="dupMobile"  value="2" <?if($_POST["dup"]=="2") echo "checked=true"; ?>/><label for="dupMobile" > Duplicates by Mobile No</label>
		<input type="submit" value="Show Report" class="button"/>
	</div>		
	<div class="cleardiv"></div>
	<div>
	<hr/>
	</div>
	</form>
	<?if($_POST) { ?>
	
	<?if($_POST["dup"]==2) { ?>
	
		<?
		$query="select mobile_no,count(registrant_id) as membercount from bkitc_profiles where rec_status=1 group by mobile_no having count(registrant_id)>1";
		$memberInfo=qry_data($query);
		
		?>
		<? foreach($memberInfo as $i=>$member) {?>	
		<? if($member["mobile_no"]=="") $member["mobile_no"]="EMPTY" ;?>
		<div>
		<h2><a href="registrants.php?txtSearch=<?=$member["mobile_no"]?>"><?=$member["mobile_no"]?></a> : <span style="font-weight:normal"><?=$member["membercount"]?> members</span></h2> 
		</div>
		
		
		<? } ?>
	
	<? } ?>
	
		<?if($_POST["dup"]==1) { ?>
	
		<?
		$query="select email_id,count(registrant_id) as membercount from bkitc_profiles where rec_status=1  group by email_id having count(registrant_id)>1";
		$memberInfo=qry_data($query);
		
		?>
		<? foreach($memberInfo as $i=>$member) {?>	
		<? if($member["email_id"]=="") $member["email_id"]="EMPTY" ;?>
		<div>
		<h2><a href="registrants.php?txtSearch=<?=$member["email_id"]?>"><?=$member["email_id"]?></a> : <span style="font-weight:normal"><?=$member["membercount"]?> members</span></h2> 
		</div>
		
		
		<? } ?>
	
	<? } ?>
	
	<?} ?>
<?php include("includes/footer.php"); ?>

